mime_to_extension = {
    "image/jpeg": "jpeg",
    "image/jpg": "jpg",
    "image/png": "png",
    "image/gif": "gif",
    "image/bmp": "bmp",
    "image/webp": "webp",
    "image/svg+xml": "svg",
    "image/heic": "heic",
    "image/heif": "heif",
    "application/pdf": "pdf",
    "text/plain": "txt",
    "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "docx",
    "application/msword": "doc",
    "application/vnd.ms-excel": "csv",
    "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "xlsx",
    "application/vnd.ms-powerpoint": "ppt",
    "application/vnd.openxmlformats-officedocument.presentationml.presentation": "pptx",
    "text/html": "html",
    "application/json": "json",
    "text/css": "css",
    "application/javascript": "js",
    "application/xml": "xml",
    "application/zip": "zip",
    "application/x-tar": "tar",
    "application/x-rar-compressed": "rar",
    "application/x-7z-compressed": "7z",
    "application/octet-stream": "bin",
    "audio/mpeg": "mp3",
    "audio/wav": "wav",
    "audio/ogg": "ogg",
    "video/mp4": "mp4",
    "video/x-msvideo": "avi",
    "video/mpeg": "mpeg",
    "video/webm": "webm",
    "image/x-icon": "ico",
    "application/x-sh": "sh",
    "application/vnd.apple.installer+xml": "mpkg",
    "application/vnd.android.package-archive": "apk",
    "application/x-msdownload": "exe",
    "application/vnd.oasis.opendocument.text": "odt",
    "application/vnd.oasis.opendocument.spreadsheet": "ods",
    "application/vnd.oasis.opendocument.presentation": "odp",
    "application/x-python-code": "py",
    "application/x-java-archive": "jar",
    "text/csv": "csv",
    "application/csv": "csv",
    "text/markdown": "md",
    "text/mdx": "mdx",
    "text/gmail_content": "html",
}


def get_extension_from_mimetype(mime_type) -> str | None:
    return mime_to_extension.get(mime_type)
